Skip to content

Conversation

@maekawataiki
Copy link
Collaborator

@maekawataiki maekawataiki commented Sep 27, 2025

Description of Changes

  • [New Feature] Add Agent Builder
  • [Refactor] Replace Custom Construct AgnetCore Runtime with CDK L1
    • [Migration Process] Deploy with createGenericAgentCoreRuntime: false once, deploy again with createGenericAgentCoreRuntime: true

Checklist

  • Modified relevant documentation
  • Verified operation in local environment
  • Executed npm run cdk:test and if there are snapshot differences, execute npm run cdk:test:update-snapshot to update snapshots

customResourceProvider,
dockerImageAsset.imageUri
);
const agentCoreRuntimeRole = this.createAgentCoreRuntimeRole();
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

私の環境依存かもしれませんが、以下のエラーが発生していました。;

AgentCoreStack: creating CloudFormation changeset...
10:35:07 | CREATE_FAILED        | AWS::BedrockAgentCore::Runtime | GenericAgentCoreGe...eRuntimeL1B2F7F803
Resource handler returned message: "Invalid request provided: Access denied while validating ECR URI 'xxxx.dkr.ecr.us-east-1.amazonaws.com/c
dk-hnb659fds-container-assets-xxxxx-us-east-1:93a0bc6401c8848c3174de19d2010ba5897f4c44ebd6dd72ac3d3b9364165d52'. The execution role requires
permissions for ecr:GetAuthorizationToken, ecr:BatchGetImage, and ecr:GetDownloadUrlForLayer operations. (Service: BedrockAgentCoreControl, Status C
ode: 400, Request ID: b4d1d923-6c79-47b4-afd5-fe87c4a7fa98) (SDK Attempt Count: 1)" (RequestToken: edb004fc-9aa1-c040-b839-a4707f45513d, HandlerErro
rCode: InvalidRequest)

grantPull をつけて解消させました。vibe 解決させたのでもう少し良い改善方法があるかもしれませんが取り急ぎ共有です。

Suggested change
const agentCoreRuntimeRole = this.createAgentCoreRuntimeRole();
const agentCoreRuntimeRole = this.createAgentCoreRuntimeRole();
dockerImageAsset.repository.grantPull(agentCoreRuntimeRole);

} from '@aws-sdk/client-cognito-identity-provider';

// Initialize Cognito client
const cognitoClient = new CognitoIdentityProviderClient({});
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

これ閉域だと endpoint 指定しないとバグる気がする。
https://github.com/aws-samples/generative-ai-use-cases/pull/1252/files
対応わからなければ後で自分が修正するので、そのままでも良いです。

new LambdaIntegration(agentBuilderFunction),
commonAuthorizerProps
);
}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

これ construct 分離したほうが良いかもしれないです。


// Deploy runtimes based on flags
this.deployGenericRuntime();
this.deployAgentBuilderRuntime();
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

これって正しいですか?フラグのどちらかが true の場合に両方の runtime を作っているように見える。

"flows": [],
"agentBuilderEnabled": false,
"createGenericAgentCoreRuntime": false,
"agentCoreExternalRuntimes": [],
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

今回の対応関係ないですが、agentCoreRegion が抜けているかもしれないです!
ついでに入れてもらえるとありがたい

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants